/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package alloy2code;

import java.util.ArrayList;

/**
 * Contains sig Data:
 * sigName and each declaration.
 * @author Daniel
 */
public class SigData {
    
    String sigName;
    ArrayList<Declaration> decls;

    public SigData(){
        decls = new ArrayList<Declaration>();
    }

    public void addDecl(String m, String label, String sig){
        Declaration tmp = new Declaration();
        tmp.setLabel(label);
        tmp.setMult(m);
        tmp.setSigName(sig);
        decls.add(tmp);
    }

    public void addDecl(Declaration decl){
        decls.add(decl);
    }
    
    public ArrayList<Declaration> getDecls() {
        return decls;
    }

    public void setSigName(String s){
        this.sigName = s;
    }
    public String getSigName() {
        return sigName;
    }

    @Override
    public String toString(){
        String tmp = "sigName: "+sigName+"\n";
        for(Declaration d : decls){
            tmp+=d.toString()+"\n";   
        }
        return tmp;
    }
}
